package com.zimmur.service.impl.fdfs;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zimmur.dao.fdfs.IStorageFilesDao;
import com.zimmur.model.fdfs.StorageFiles;
import com.zimmur.service.fdfs.IStorageFilesService;

@Service("storageFilesServiceImpl")
public class StorageFilesServiceImpl implements IStorageFilesService {

	@Resource
	private IStorageFilesDao storageFilesDao;
	
	@Override
	public boolean insert(StorageFiles file) {
		return storageFilesDao.insert(file)>0?true:false;
	}

	@Override
	public StorageFiles selectByFileId(long fileId) {
		return storageFilesDao.selectByFileId(fileId);
	}

	@Override
	public boolean deleteByFileId(long fileId) {
		return storageFilesDao.deleteByFileId(fileId)>0?true:false;
	}
	
}
